Skip to content

Conversation

@cmd05
Copy link
Contributor

@cmd05 cmd05 commented Nov 7, 2025

Adds basic information for missing CSRs necessary for #1209. List of CSRs: sie, dscratch0, dscratch1

Based on:

@ThinkOpenly
Copy link
Collaborator

It appears that sedeleg and sideleg were also defined by the now-defunct "N" extension, so please remove those, too.

That leaves sie (defined by "S" extension), dscratch0 and dscratch1 (defined by "Sdext" extension).

Looks like to get these new CSRs to pass the CI tests, we'll need to add the fields.

  • For sie, that points to scause for interrupt values. scause is defined in UDB and has some code that seems to beg for expansion, but I don't see anything that performs that expansion. If you want to replicate the incomplete implementation in scause into sie, that's fine for now, just to get the basics of sie defined in UDB.
  • dscratch0 and dscratch are generic registers which just contain a "value", so let's define a field, "VALUE" of MXLEN bits. See "mtval.yaml" for an example.

[FYI, I removed "ustatus, uie, utvec, uscratch, uepc, ucause, utval, uip, sedeleg, sideleg" from the PR description.]

@codecov
Copy link

codecov bot commented Nov 11, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 46.05%. Comparing base (15e139b) to head (132d6c8).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1236   +/-   ##
=======================================
  Coverage   46.05%   46.05%           
=======================================
  Files          11       11           
  Lines        4942     4942           
  Branches     1345     1345           
=======================================
  Hits         2276     2276           
  Misses       2666     2666           
Flag Coverage Δ
idlc 46.05% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Collaborator

@ThinkOpenly ThinkOpenly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yay! CI passed!

Just a few nits, then we'll get this merged.

@@ -0,0 +1,26 @@
# Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are encouraged to put your own copyright here, since this is your work! :-) Here, and the other files as well, of course.

(There are plenty of examples in the repo.)

Comment on lines +19 to +20
alias:
- mie.SSIE
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove all of the alias attributes. "alias" means that this field actually is another means of accessing the aliased field. Here, though, the field is standalone. It corresponds to the other register's fields for convenience, but is distinct.

alias:
- mie.SSIE
description: |
*Supervisor Software Interrupt Enable*
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove the * characters, here and elsewhere.

*Supervisor Software Interrupt Enable*
type: RW
reset_value: UNDEFINED_LEGAL
definedBy: S
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the field is definedBy the same extension as the CSR, then it does not need to be explicitly specified, so remove all definedBy: S attributes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants